<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<html>
<head>
	<title>单梯监控</title>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
	<link rel="stylesheet" type="text/css" href="../../css/style.css">
	<script type="text/javascript" src="../../js/jquery-1.8.2.js"></script>
	<script type="text/javascript" src="../../js/dialog/jquery.artDialog.source.js?skin=default"></script>
	<script type="text/javascript" src="../../js/dialog/plugins/iframeTools.source.js"></script>
	<script type="text/javascript" src="../../js/jquery.form.js"></script>
	<script type="text/javascript" src="../../js/base.js"></script>
	<script type="text/javascript">
	var loop = false;
	var loopMonitor = function(){
		//if(loop){
			if($('#eleCode').text() != ''){
				$.post('dtjk_search.action',{eleCode:$('#eleCode').text()},function(data){
					if(response != null){
						$('#eleBasicId').html(response.eleBasicId);
						$('#eleCode').html(response.eleCode);
						$('#eleName').html(response.eleName);
						$('#adminName').html(response.adminName);
						$('#propertyName').html(response.propertyName);
						$('#serviceName').html(response.serviceName);
						$('#eleUseUnit').html(response.eleUseUnit);
						$('#eleTopFloor').html(response.eleTopFloor);
						$('#eleGroundFloor').html(response.eleGroundFloor);
						$('#serviceTime').html(response.serviceTime);
						$('#checkTime').html(response.checkTime);
						$('#proUserName1').html(response.proUserName1);
						$('#proUserPhone1').html(response.proUserPhone1);
						$('#proUserName2').html(response.proUserName2);
						$('#proUserPhone2').html(response.proUserPhone2);
						$('#serUserName1').html(response.serUserName1);
						$('#serUserPhone1').html(response.serUserPhone1);
						$('#serUserName2').html(response.serUserName2);
						$('#serUserPhone2').html(response.serUserPhone2);
						$('#moveState').html(response.moveState);
						$('#faultType').html(response.faultType);
						$('#moveSpeed').html(response.moveSpeed);
						$('#stateSwitch').html(response.stateSwitch);
						$('#localFloor').html(response.localFloor);
						$('#eleDoorState').html(response.eleDoorState);
						$('#urgencyCall').html(response.urgencyCall);
						$('#moveDegree').html(response.moveDegree);
					}else{
						$('#eleBasicId').html('');
						$('#eleCode').html('');
						$('#eleName').html('');
						$('#adminName').html('');
						$('#propertyName').html('');
						$('#serviceName').html('');
						$('#eleUseUnit').html('');
						$('#eleTopFloor').html('');
						$('#eleGroundFloor').html('');
						$('#serviceTime').html('');
						$('#checkTime').html('');
						$('#proUserName1').html('');
						$('#proUserPhone1').html('');
						$('#proUserName2').html('');
						$('#proUserPhone2').html('');
						$('#serUserName1').html('');
						$('#serUserPhone1').html('');
						$('#serUserName2').html('');
						$('#serUserPhone2').html('');
						$('#moveState').html('');
						$('#faultType').html('');
						$('#moveSpeed').html('');
						$('#stateSwitch').html('');
						$('#localFloor').html('');
						$('#eleDoorState').html('');
						$('#urgencyCall').html('');
						$('#moveDegree').html('');
						$.dialog.alert('您查询的电梯不存在！');
					}
				},'json');
				setTimeout(loopMonitor,10000);
			}else{
				alert('请先查询电梯...');
			}
		//}
	}
	$(function(){
		$(document.dtsfrom).ajaxForm({
			dataType:'json',
			success:dtsfrom_success
		});
		$('#start').click(function(){
			if($('#eleCode').text()!=""){
				$.post('dtjk_loop.action',{status:1,eleCode:$('#eleCode').text()},function(){
					loop = true;
					loopMonitor();
					$.dialog.tips('请等待电梯进入监控状态!！');
				});
			}else{
				$.dialog.alert('请先查询电梯...');
			}
		});
		/*$('#stop').click(function(){
			//loop = true;
			stopl();
		});*/
	});
	/*
	var stopl = function(){
		if($('#eleCode').text() !="" && loop == false){
			$.post('dtjk_loop.action',{status:0,eleCode:$('#eleCode').text()});
		}
		if(loop != false && $('#eleCode').text()!=""){
			$('#eleBasicId').html('');
			$('#eleCode').html('');
			$('#eleName').html('');
			$('#adminName').html('');
			$('#propertyName').html('');
			$('#serviceName').html('');
			$('#eleUseUnit').html('');
			$('#eleTopFloor').html('');
			$('#eleGroundFloor').html('');
			$('#serviceTime').html('');
			$('#checkTime').html('');
			$('#proUserName1').html('');
			$('#proUserPhone1').html('');
			$('#proUserName2').html('');
			$('#proUserPhone2').html('');
			$('#serUserName1').html('');
			$('#serUserPhone1').html('');
			$('#serUserName2').html('');
			$('#serUserPhone2').html('');
			$('#moveState').html('');
			$('#faultType').html('');
			$('#moveSpeed').html('');
			$('#stateSwitch').html('');
			$('#localFloor').html('');
			$('#eleDoorState').html('');
			$('#urgencyCall').html('');
			$('#moveDegree').html('');
			$.dialog.alert('已停止监控！');
		}
		loop = false;
		loopMonitor();
	}
	*/
	var searchchange = function(){
		$(document.dtsfrom).submit();
	}
	var dtsfrom_success = function(response){
		//loop = false;
		//stopl();
		if(response != null){
			$('#eleBasicId').html(response.eleBasicId);
			$('#eleCode').html(response.eleCode);
			$('#eleName').html(response.eleName);
			$('#adminName').html(response.adminName);
			$('#propertyName').html(response.propertyName);
			$('#serviceName').html(response.serviceName);
			$('#eleUseUnit').html(response.eleUseUnit);
			$('#eleTopFloor').html(response.eleTopFloor);
			$('#eleGroundFloor').html(response.eleGroundFloor);
			$('#serviceTime').html(response.serviceTime);
			$('#checkTime').html(response.checkTime);
			$('#proUserName1').html(response.proUserName1);
			$('#proUserPhone1').html(response.proUserPhone1);
			$('#proUserName2').html(response.proUserName2);
			$('#proUserPhone2').html(response.proUserPhone2);
			$('#serUserName1').html(response.serUserName1);
			$('#serUserPhone1').html(response.serUserPhone1);
			$('#serUserName2').html(response.serUserName2);
			$('#serUserPhone2').html(response.serUserPhone2);
			$('#moveState').html(response.moveState);
			$('#faultType').html(response.faultType);
			$('#moveSpeed').html(response.moveSpeed);
			$('#stateSwitch').html(response.stateSwitch);
			$('#localFloor').html(response.localFloor);
			$('#eleDoorState').html(response.eleDoorState);
			$('#urgencyCall').html(response.urgencyCall);
			$('#moveDegree').html(response.moveDegree);
		}else{
			$('#eleBasicId').html('');
			$('#eleCode').html('');
			$('#eleName').html('');
			$('#adminName').html('');
			$('#propertyName').html('');
			$('#serviceName').html('');
			$('#eleUseUnit').html('');
			$('#eleTopFloor').html('');
			$('#eleGroundFloor').html('');
			$('#serviceTime').html('');
			$('#checkTime').html('');
			$('#proUserName1').html('');
			$('#proUserPhone1').html('');
			$('#proUserName2').html('');
			$('#proUserPhone2').html('');
			$('#serUserName1').html('');
			$('#serUserPhone1').html('');
			$('#serUserName2').html('');
			$('#serUserPhone2').html('');
			$('#moveState').html('');
			$('#faultType').html('');
			$('#moveSpeed').html('');
			$('#stateSwitch').html('');
			$('#localFloor').html('');
			$('#eleDoorState').html('');
			$('#urgencyCall').html('');
			$('#moveDegree').html('');
			$.dialog.alert('您查询的电梯不存在！');
		}
	}
	</script>
</head>
<body class="app">
	<h3>单梯监控</h3>
	<form class="search" name="dtsfrom" action="dtjk_search.action" method="post">
		<dl style="margin-bottom:5px;">
			<dt>电梯号码：</dt>
			<dd style="height:26px;"><input type="text" class="inputText" name="eleCode" style="width:110px;" onblur="searchchange()"/></dd>
			<dd style="float:right;"><input type="submit" value="查询" class="inputButton"/></dd>
			<div class="cl"></div>
		</dl>
	</form>
	<table style="width:100%">
	<tr>
		<td valign="top" width="35%">
			<dl class="vm">
				
				<dt>电梯号码：</dt>
				<dd><span id="eleCode"></span></dd>
				<dt>电梯名称：</dt>
				<dd><span id="eleName"></span></dd>
				<dt>地址：</dt>
				<dd><span id=""></span></dd>
				<dt>行政监管单位：</dt>
				<dd><span id="adminName"></span></dd>
				<dt>物业单位：</dt>
				<dd><span id="propertyName"></span></dd>
				<dt>维保单位：</dt>
				<dd><span id="serviceName"></span></dd>
				<dt>使用单位：</dt>
				<dd><span id="eleUseUnit"></span></dd>
				<dt>电梯顶层：</dt>
				<dd><span id="eleTopFloor"></span></dd>
				<dt>电梯底层：</dt>
				<dd><span id="eleGroundFloor"></span></dd>
				<dt>下次维保：</dt>
				<dd><span id="serviceTime"></span></dd>
				<dt>下次年检：</dt>
				<dd><span id="checkTime"></span></dd>
				<dt style="height:44px">物业联系人：</dt>
				<dd style="height:44px">
					<p><span id="proUserName1"></span>（<span id="proUserPhone1"></span>）</p>
					<p><span id="proUserName2"></span>（<span id="proUserPhone2"></span>）</p>
				</dd>
				<dt style="height:44px">维保联系人：</dt>
				<dd style="height:44px">
					<p><span id="serUserName1"></span>（<span id="serUserPhone1"></span>）</p>
					<p><span id="serUserName2"></span>（<span id="serUserPhone2"></span>）</p>
				</dd>
				<div class="cl"></div>
			</dl>
		</td>
		<td align="center">
			<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="185" height="425">
		      <param name="movie" value="../../img/dianti.swf">
		      <param name="quality" value="high">
		      <param name="wmode" value="transparent">
		      <embed src="../../img/dianti.swf" width="185" height="425" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" wmode="transparent"></embed>
		    </object>
		</td>
		<td valign="top" width="35%">
			<dl class="vm">
				<dt>运行状态：</dt>
				<dd><span id="moveState"></span></dd>
				<dt>故障类型：</dt>
				<dd><span id="faultType"></span></dd>
				<dt>运行速度：</dt>
				<dd><span id="moveSpeed"></span></dd>
				<dt>运行方向：</dt>
				<dd><span id="stateSwitch"></span></dd>
				<dt>所在楼层：</dt>
				<dd><span id="localFloor"></span></dd>
				<dt>电梯门状态：</dt>
				<dd><span id="eleDoorState"></span></dd>
				<dt>紧急呼叫：</dt>
				<dd><span id="urgencyCall"></span></dd>
				<dt>电梯运行次数：</dt>
				<dd><span id="moveDegree"></span></dd>
				<dt>门机运行速度：</dt>
				<dd><span id=""></span></dd>
				<dt>制动器运行速度：</dt>
				<dd><span id=""></span></dd>
				<dt>主接触器运行速度：</dt>
				<dd><span id=""></span></dd>
				<dt>辅助接触器运行速度：</dt>
				<dd><span id=""></span></dd>
				<dt>钢丝绳折弯次数：</dt>
				<dd><span id=""></span></dd>
				<dt style="height:44px">操作：</dt>
				<dd style="height:44px">
					<p><span id="">【语音通话】</span></p>
					<p><span id="">【现场视频】</span></p>
				</dd>
				<div class="cl"></div>
			</dl>
		</td>
	</tr>
	<tr>
		<td colspan="3" align="right"><span id="start" class="hand">【开始监控】</span><!-- <span id="stop" class="hand">【停止监控】</span> --></td>
	</tr>
	</table>
</body>
</html>
